using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace MeteorShower
{
    
    class Ship
    {
        int x = 150;
        int y = 150;
        
        Vector2 shipposition;
        Vector2 origin;

        int s_y = 480;
        int s_x = 840; 
    
        
        public Ship()
        {
            
            origin = new Vector2();
            shipposition = new Vector2();
            shipposition.X = x;
            shipposition.Y = y; 
        }

      

        public void move(int touchx, int touchy )
        {
            if (touchy > 390 || touchy < 190)
            {
                touchy = 390;
            }
            if (touchx > 200 || touchy < 0)
            {
                touchx = 200;
            }

            shipposition.Y += (touchy - 340) / 10;
            shipposition.X += (touchx - 100) / 10;

            if (shipposition.Y >= s_y - 25)
            {
                shipposition.Y = s_y - 25;
            }

            if (shipposition.Y <= s_y /8 + 30)
            {
                shipposition.Y = s_y /8 + 30;
            }

            if (shipposition.X <= 55)
            {
                shipposition.X = 55; 
            }

            if (shipposition.X >= (730))
            {
                shipposition.X = 730; 
            }

                


        }


        public Vector2 getshipposition()
        {
            return shipposition;
        }

        public float getshipx()
        {
            return shipposition.X;
        }
        public float getshipy()
        {
            return shipposition.Y;
        }






       
        //public int shiplocation()
        //{
            // = (x,y); 
          //  return x;
        //}
    }
}
